package org.example.spring.xmlTx;

import org.springframework.jdbc.core.support.JdbcDaoSupport;

//账户操作持久层
//技术方案：jdbctempate
public class AccountDAO extends JdbcDaoSupport{
	
	//转入
	public void in(String name,Double money){
		String sql="update t_account set money = money+ ? where name = ?";
		super.getJdbcTemplate().update(sql, money,name);
	}
	
	//转出
	public void out(String name,Double money){
		String sql="update t_account set money = money- ? where name = ?";
		super.getJdbcTemplate().update(sql, money,name);
	}
}
